package com.game.ammo {
	import com.game.utils.TowerType;
	public class AmmoFactory {
		public function AmmoFactory() {
			throw new Error("AmmoFactory instances are never to be instantiated.");
		}
		public static function getAmmo(type:TowerType, bulX:Number, bulY:Number, ang:Number, destination:Number,upgrades:int,suggestiveDistance:int):Ammo {
			switch (type) {
				case TowerType.BULLET:
					return new Bullet(bulX, bulY, ang, destination, type,upgrades,suggestiveDistance);
					break;
				case TowerType.SLOW:
					return new Slow(bulX, bulY, ang, destination, type,upgrades,suggestiveDistance);
					break;
				case TowerType.ROCKET:
					return new Rocket(bulX, bulY, ang, destination, type,upgrades,suggestiveDistance);
					break;
				case TowerType.FIRE:
					return new Fire(bulX, bulY, ang, destination, type,upgrades,suggestiveDistance);
					break;
				case TowerType.SPARK:
					return new Spark(bulX, bulY, ang, destination, type,upgrades,suggestiveDistance);
					break;
				case TowerType.WAVE:
					return new Wave(bulX, bulY, ang, destination, type,upgrades,suggestiveDistance);
					break;
				default:
					throw new Error("wrong type");
					break;
			}
		}
	}
}